﻿@model IEnumerable<FastQues.Models.QuestionRecord>

@{
    var questionnaire = (Questionnaire)ViewBag.questionnaire;

    ViewBag.Title = questionnaire.QuestionnaireName;
    ViewBag.Source = questionnaire.Source;
}

<h2>@questionnaire.QuestionnaireName</h2>

<p>
    @Html.ActionLink("Create New", "Answer", new { ID= questionnaire.ID})
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Province)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.City)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RecordTime)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Province)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.City)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RecordTime)
        </td>
        <td>
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
    </tr>
}

</table>
